<!-- 这个模块我正在开发 我是qq是491746560 T5-刘德鑫  -->
<template>
	<view class="mine">
		<userInfo />
		<view class="loginStatus">
			<view :class="['loginBtn', {'logut': userInfo}]" @click="gowhere('login')">{{userInfo? '退出登陆': '登陆'}}</view>
		</view>
		<view class="touchUs" @click="phoneUs"><view>联系我们</view><uniIcons type="arrowright" color="#D3D0DB" size="18" /></view>
		
		
	</view>
</template>

<script>
	import { mapState, mapActions,mapMutations } from 'vuex'
	import { phone } from '@/utils/util'
	import userInfo from '@/common/components/userInfo.vue'
	import uniIcons from '@/components/uni-icons/uni-icons.vue'
	export default {
		data() {
			return {
				loginStatus: true
			}
		},
		components:{
			userInfo,
			uniIcons
		},
		computed:{
			...mapState('user', ['userInfo'])
		},
		methods: {
			...mapActions('app', ['phoneUs']),
			...mapMutations('user', ['SET_USERINFO']),
			gowhere(name){
				if(!this.userInfo) { // 去登陆
					this.$Router.push({
						route: this.$Routes[name]
					});
				} else { // 退出登陆
					this.SET_USERINFO(null)
				}
			}
		}
	}
</script>

<style lang="less" scoped>
.mine{
	.touchUs{
		box-sizing: border-box;
		background-color: #F5F5F5;
		border-radius: 44rpx;
		padding: 30rpx 48rpx;
		margin:40rpx;
		font-size: 36rpx;
		color:#333;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.loginStatus{
		.loginBtn{
			width: 400rpx;
			text-align: center;
			font-size: 40rpx;
			padding: 28rpx 0;
			background-color: #6DDDCB;
			color:#fff;
			border-radius: 56rpx;
			margin:20rpx auto 100rpx;
			&.logut{
				background-color: #FF5A45;
			}
		}
	}
}
</style>
